﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Reports" targetNamespace="http://tempuri.org/Reports.xsd" xmlns:mstns="http://tempuri.org/Reports.xsd" xmlns="http://tempuri.org/Reports.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="DIAptekaConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="DIAptekaConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.DIProject.Properties.Settings.GlobalReference.Default.DIAptekaConnectionString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="Reports_GetSZDataTableAdapter" GeneratorDataComponentClassName="Reports_GetSZDataTableAdapter" Name="Reports_GetSZData" UserDataComponentName="Reports_GetSZDataTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIOffice.dbo.Reports_GetSZData" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>Reports_GetSZData</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@xml" Precision="0" ProviderType="Text" Scale="0" Size="2147483647" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="FullName" DataSetColumn="FullName" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="RestQntty" DataSetColumn="RestQntty" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="BarCode" DataSetColumn="BarCode" />
              <Mapping SourceColumn="CertificateNumber" DataSetColumn="CertificateNumber" />
              <Mapping SourceColumn="BatchNumber" DataSetColumn="BatchNumber" />
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="CertificateDate" DataSetColumn="CertificateDate" />
              <Mapping SourceColumn="ContragentName" DataSetColumn="ContragentName" />
              <Mapping SourceColumn="ContragentDocDate" DataSetColumn="ContragentDocDate" />
              <Mapping SourceColumn="ContragentDocNumber" DataSetColumn="ContragentDocNumber" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="Torg13_InfoTableAdapter" GeneratorDataComponentClassName="Torg13_InfoTableAdapter" Name="Torg13_Info" UserDataComponentName="Torg13_InfoTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	AptekaName				= p.Name
	,	DocDate					= d.DocDate
	,	DocNumber				= d.DocNumber
	,	CreditorName			= ct.Name
	,	DebitorName				= dt.Name
from	pr.DepartmentOptions	o
join	co.Departments			ct
	on	ct.Id					= o.DepartmentId
join	ca.Contragents			p
	on	p.Id					= 0
join	ca.Documents			d
	on	d.Id					= @DocId
join	co.Departments			dt
	on	dt.Id					= d.ShiftDepartmentId
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="CreditorName" DataSetColumn="CreditorName" />
              <Mapping SourceColumn="DebitorName" DataSetColumn="DebitorName" />
              <Mapping SourceColumn="AptekaName" DataSetColumn="AptekaName" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="Torg13_DataTableAdapter" GeneratorDataComponentClassName="Torg13_DataTableAdapter" Name="Torg13_Data" UserDataComponentName="Torg13_DataTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Name			= a.Name
--	,	FullName		= a.Name
--						+ (case when a.MedFormId is null or a.MedFormId = 1 then '' else ' ' + f.ShortName end)
--						+ (case when g.RetailPack = 1 then '' else ' №' + convert(varchar(10), g.RetailPack) end)
	,	Qntty			= -l.Qntty
	,	RetailPrice		= p.RetailPrice
	,	RetailSum		= -l.RetailSum
from	ca.Documents	d	with(nolock)
join	ca.GoodsDocLines l	with(nolock)
	on	l.DocId			= d.Id
join	cd.Parties		p	with(nolock)
	on	p.Id			= l.PartyId
join	ca.Goods		g	with(nolock)
	on	g.Id			= p.GoodsId
join	co.Manufacturers m	with(nolock)
	on	m.Id			= g.ManufacturerId
join	ca.Assortment	a	with(nolock)
	on	a.Id			= g.AssortmentId
--join	co.MedForm		f	with(nolock)
--	on	f.Id			= a.MedFormId
where	d.Id			= @DocId
	and	d.DocTypeId		= 4
order by a.Name
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="RetailSum" DataSetColumn="RetailSum" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="Mx15_InfoTableAdapter" GeneratorDataComponentClassName="Mx15_InfoTableAdapter" Name="Mx15_Info" UserDataComponentName="Mx15_InfoTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	AptekaName				= p.Name
	,	DepartmentName			= t.Name
	,	DocDate					= d.DocDate
	,	DocNumber				= d.DocNumber
	,	ReasonDate				= convert(datetime, null)		-- Дата основания
	,	ReasonNumber			= convert(varchar(20), null)	-- Номер основания
	,	Position				= convert(varchar(50), null)	-- Должность руководителя
	,	Person					= convert(varchar(50), null)	-- ФИО руководителя
	,	Position1				= convert(varchar(50), null)	-- Должность материально-ответственного лица 1
	,	Person1					= convert(varchar(50), null)	-- ФИО материально-ответственного лица 1
	,	Position2				= convert(varchar(50), null)	-- Должность материально-ответственного лица 2
	,	Person2					= convert(varchar(50), null)	-- ФИО материально-ответственного лица 2
	,	MemberPosition0			= convert(varchar(50), null)	-- Должность председателя комиссии
	,	MemberPerson0			= convert(varchar(50), null)	-- ФИО председателя комиссии
	,	MemberPosition1			= convert(varchar(50), null)	-- Должность члена комиссии 1
	,	MemberPerson1			= convert(varchar(50), null)	-- ФИО члена комиссии 1
	,	MemberPosition2			= convert(varchar(50), null)	-- Должность члена комиссии 2
	,	MemberPerson2			= convert(varchar(50), null)	-- ФИО члена комиссии 2
from	pr.DepartmentOptions	o
join	co.Departments			t
	on	t.Id					= o.DepartmentId
join	ca.Contragents			p
	on	p.Id					= 0
join	ca.Documents			d
	on	d.Id					= @DocId
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="AptekaName" DataSetColumn="AptekaName" />
              <Mapping SourceColumn="DepartmentName" DataSetColumn="DepartmentName" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="ReasonDate" DataSetColumn="ReasonDate" />
              <Mapping SourceColumn="ReasonNumber" DataSetColumn="ReasonNumber" />
              <Mapping SourceColumn="Position" DataSetColumn="Position" />
              <Mapping SourceColumn="Person" DataSetColumn="Person" />
              <Mapping SourceColumn="Position1" DataSetColumn="Position1" />
              <Mapping SourceColumn="Person1" DataSetColumn="Person1" />
              <Mapping SourceColumn="Position2" DataSetColumn="Position2" />
              <Mapping SourceColumn="Person2" DataSetColumn="Person2" />
              <Mapping SourceColumn="MemberPosition0" DataSetColumn="MemberPosition0" />
              <Mapping SourceColumn="MemberPerson0" DataSetColumn="MemberPerson0" />
              <Mapping SourceColumn="MemberPosition1" DataSetColumn="MemberPosition1" />
              <Mapping SourceColumn="MemberPerson1" DataSetColumn="MemberPerson1" />
              <Mapping SourceColumn="MemberPosition2" DataSetColumn="MemberPosition2" />
              <Mapping SourceColumn="MemberPerson2" DataSetColumn="MemberPerson2" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="Mx15_DataTableAdapter" GeneratorDataComponentClassName="Mx15_DataTableAdapter" Name="Mx15_Data" UserDataComponentName="Mx15_DataTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     id.DocDate AS IncomeDate, il.MadeDate, id.ContragentDocDate AS InvoiceDate, id.ContragentDocNumber AS InvoiceNumber, a.Name, nl.Qntty, 
                      (op.RetailPrice - np.RetailPrice) / op.RetailPrice * 100 AS ReducePercent, op.RetailPrice AS OldRetailPrice, - ol.RetailSum AS OldRetailSum, 
                      np.RetailPrice AS NewRetailPrice, nl.RetailSum AS NewRetailSum, op.RetailPrice - np.RetailPrice AS PriceDefference, 
                      - ol.RetailSum - nl.RetailSum AS SumDefference, op.BarCode AS OldBarcode, np.BarCode AS NewBarcode, 
                      CASE r.Id WHEN 2 THEN w.RepriceWriteoffReasonText ELSE r.Name END AS ReduceReason, w.QualityLossMark AS ReduceSign, w.Note
FROM         CA.GoodsDocLines AS ol INNER JOIN
                      CA.GoodsDocLines AS nl ON nl.DocId = ol.DocId AND nl.ReturnLineId = ol.Id INNER JOIN
                      CD.RepriceWriteoffLines AS w ON w.GoodsDocLineId = nl.Id INNER JOIN
                      CO.RepriceWriteoffReason AS r ON r.Id = w.RepriceWriteoffReasonId INNER JOIN
                      CD.Parties AS op ON op.Id = ol.PartyId INNER JOIN
                      CD.InputLines AS il ON il.Id = op.InputLineId INNER JOIN
                      CA.Documents AS id ON id.Id = il.DocId INNER JOIN
                      CD.Parties AS np ON np.Id = nl.PartyId AND np.DocId = nl.DocId INNER JOIN
                      CA.Goods AS g ON g.Id = op.GoodsId INNER JOIN
                      CO.Manufacturers AS m ON m.Id = g.ManufacturerId INNER JOIN
                      CA.Assortment AS a ON a.Id = g.AssortmentId
WHERE     (ol.DocId = @DocId)
ORDER BY a.Name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="DocId" DataSourceName="DIApteka.CA.GoodsDocLines" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="IncomeDate" DataSetColumn="IncomeDate" />
              <Mapping SourceColumn="MadeDate" DataSetColumn="MadeDate" />
              <Mapping SourceColumn="InvoiceDate" DataSetColumn="InvoiceDate" />
              <Mapping SourceColumn="InvoiceNumber" DataSetColumn="InvoiceNumber" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="ReducePercent" DataSetColumn="ReducePercent" />
              <Mapping SourceColumn="OldRetailPrice" DataSetColumn="OldRetailPrice" />
              <Mapping SourceColumn="OldRetailSum" DataSetColumn="OldRetailSum" />
              <Mapping SourceColumn="NewRetailPrice" DataSetColumn="NewRetailPrice" />
              <Mapping SourceColumn="NewRetailSum" DataSetColumn="NewRetailSum" />
              <Mapping SourceColumn="PriceDefference" DataSetColumn="PriceDefference" />
              <Mapping SourceColumn="SumDefference" DataSetColumn="SumDefference" />
              <Mapping SourceColumn="ReduceReason" DataSetColumn="ReduceReason" />
              <Mapping SourceColumn="ReduceSign" DataSetColumn="ReduceSign" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="OldBarcode" DataSetColumn="OldBarcode" />
              <Mapping SourceColumn="NewBarcode" DataSetColumn="NewBarcode" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="WriteOff_InfoTableAdapter" GeneratorDataComponentClassName="WriteOff_InfoTableAdapter" Name="WriteOff_Info" UserDataComponentName="WriteOff_InfoTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	AptekaName				= p.Name
	,	DepartmentName			= t.Name
	,	DocDate					= d.DocDate
	,	DocNumber				= d.DocNumber
	,	Position1				= convert(varchar(50), null)	-- Должность материально-ответственного лица
	,	Person1					= convert(varchar(50), null)	-- ФИО материально-ответственного лица
	,	MemberPosition0			= convert(varchar(50), null)	-- Должность председателя комиссии
	,	MemberPerson0			= convert(varchar(50), null)	-- ФИО председателя комиссии
	,	MemberPosition1			= convert(varchar(50), null)	-- Должность члена комиссии 1
	,	MemberPerson1			= convert(varchar(50), null)	-- ФИО члена комиссии 1
	,	MemberPosition2			= convert(varchar(50), null)	-- Должность члена комиссии 2
	,	MemberPerson2			= convert(varchar(50), null)	-- ФИО члена комиссии 2
from	pr.DepartmentOptions	o
join	co.Departments			t
	on	t.Id					= o.DepartmentId
join	ca.Contragents			p
	on	p.Id					= 0
join	ca.Documents			d
	on	d.Id					= @DocId
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="AptekaName" DataSetColumn="AptekaName" />
              <Mapping SourceColumn="DepartmentName" DataSetColumn="DepartmentName" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="Position1" DataSetColumn="Position1" />
              <Mapping SourceColumn="Person1" DataSetColumn="Person1" />
              <Mapping SourceColumn="MemberPosition0" DataSetColumn="MemberPosition0" />
              <Mapping SourceColumn="MemberPerson0" DataSetColumn="MemberPerson0" />
              <Mapping SourceColumn="MemberPosition1" DataSetColumn="MemberPosition1" />
              <Mapping SourceColumn="MemberPerson1" DataSetColumn="MemberPerson1" />
              <Mapping SourceColumn="MemberPosition2" DataSetColumn="MemberPosition2" />
              <Mapping SourceColumn="MemberPerson2" DataSetColumn="MemberPerson2" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="WriteOff_DataTableAdapter" GeneratorDataComponentClassName="WriteOff_DataTableAdapter" Name="WriteOff_Data" UserDataComponentName="WriteOff_DataTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Name			= a.Name															-- Наименование товара
	,	Barcode			= p.Barcode															-- Штрих-код
	,	Qntty			= -l.Qntty															-- Количество уценённого товара
	,	SupplierPrice	= il.SupplierPrice													-- Цена оптовая
	,	SupplierSum		= -il.SupplierPrice*l.Qntty											-- Сумма оптовая
	,	RetailPrice		= p.RetailPrice														-- Цена розничная
	,	RetailSum		= -l.RetailSum														-- Сумма розничная
	,	SumDifference	= -l.RetailSum - (-il.SupplierPrice*l.Qntty)						-- Сумма наценки
	,	ReduceReason	= case r.Id when 2 then w.RepriceWriteoffReasonText else r.Name end	-- Причина уценки
	,	ReduceSign		= w.QualityLossMark													-- Признак уценки
	,	Note			= w.Note															-- Примечание
from	ca.Documents	d
join	ca.GoodsDocLines l
	on	l.DocId			= d.Id
join	cd.RepriceWriteoffLines w
	on	w.GoodsDocLineId= l.Id
join	co.RepriceWriteoffReason r
	on	r.Id			= w.RepriceWriteoffReasonId
join	cd.Parties		p
	on	p.Id			= l.PartyId
join	cd.InputLines	il
	on	il.Id			= p.InputLineId
join	ca.Documents	id
	on	id.Id			= il.DocId
join	ca.Goods		g
	on	g.Id			= p.GoodsId
join	co.Manufacturers m
	on	m.Id			= g.ManufacturerId
join	ca.Assortment	a
	on	a.Id			= g.AssortmentId
where	d.Id			= @DocId
order by a.Name
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="RetailSum" DataSetColumn="RetailSum" />
              <Mapping SourceColumn="ReduceReason" DataSetColumn="ReduceReason" />
              <Mapping SourceColumn="ReduceSign" DataSetColumn="ReduceSign" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="Barcode" DataSetColumn="Barcode" />
              <Mapping SourceColumn="SupplierPrice" DataSetColumn="SupplierPrice" />
              <Mapping SourceColumn="SupplierSum" DataSetColumn="SupplierSum" />
              <Mapping SourceColumn="SumDifference" DataSetColumn="SumDifference" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShortageReport_InfoTableAdapter" GeneratorDataComponentClassName="ShortageReport_InfoTableAdapter" Name="ShortageReport_Info" UserDataComponentName="ShortageReport_InfoTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	distinct
		Number				= d.DocNumber				-- Номер акта
	,	Date				= d.DocDate					-- Дата акта
	,	AptekaName			= a.Name					-- Наименование аптеки
	,	ChiefName			= a.DirectorFIO				-- ФИО директора
	,	SupplierName		= s.Name					-- Наименование поставщика
	,	IncomeDocNumber		= rd.DocNumber				-- Номер приходного документа
	,	IncomeDocDate		= rd.DocDate				-- Дата приходного документа
	,	RefuseReason		= d.Note					-- Причина отказа
from	ca.Documents		d
join	ca.Contragents		s	-- поставщик
	on	s.Id				= d.ContragentId
join	ca.Contragents		a	-- аптека
	on	a.Id				= 0
join	ca.GoodsDocLines	l
	on	l.DocId				= d.Id
join	ca.GoodsDocLines	rl
	on	rl.Id				= l.ReturnLineId
join	ca.Documents		rd
	on	rd.Id				= rl.DocId
where	d.Id				= @DocId
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Number" DataSetColumn="Number" />
              <Mapping SourceColumn="Date" DataSetColumn="Date" />
              <Mapping SourceColumn="AptekaName" DataSetColumn="AptekaName" />
              <Mapping SourceColumn="ChiefName" DataSetColumn="ChiefName" />
              <Mapping SourceColumn="SupplierName" DataSetColumn="SupplierName" />
              <Mapping SourceColumn="IncomeDocNumber" DataSetColumn="IncomeDocNumber" />
              <Mapping SourceColumn="IncomeDocDate" DataSetColumn="IncomeDocDate" />
              <Mapping SourceColumn="RefuseReason" DataSetColumn="RefuseReason" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShortageReport_DataTableAdapter" GeneratorDataComponentClassName="ShortageReport_DataTableAdapter" Name="ShortageReport_Data" UserDataComponentName="ShortageReport_DataTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	GoodsCode			= convert(varchar(15), null)	-- Код товара
	,	GoodsName			= v.FullName					-- Наименование товара
	,	Manufacturer		= v.ManufacturerName			-- Производитель
	,	Lot					= i.BatchNumber					-- Серия
	,	Count				= -l.Qntty						-- Количество
	,	Price				= i.SupplierPrice				-- Цена с НДС
	,	Sum					= -l.Qntty*i.SupplierPrice		-- Сумма с НДС
	,	ExpirationDate		= i.ReadyBefore					-- Срок годности
from	ca.Documents		d
join	ca.GoodsDocLines	l
	on	l.DocId				= d.Id
join	cd.Parties			p
	on	p.Id				= l.PartyId
join	cd.InputLines		i
	on	i.Id				= p.InputLineId
join	dbo.vwGoodsDetailed	v
	on	v.Id				= p.GoodsId
where	d.Id				= @DocId
order by v.FullName, v.ManufacturerName
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="GoodsCode" DataSetColumn="GoodsCode" />
              <Mapping SourceColumn="GoodsName" DataSetColumn="GoodsName" />
              <Mapping SourceColumn="Manufacturer" DataSetColumn="Manufacturer" />
              <Mapping SourceColumn="Lot" DataSetColumn="Lot" />
              <Mapping SourceColumn="Count" DataSetColumn="Count" />
              <Mapping SourceColumn="Price" DataSetColumn="Price" />
              <Mapping SourceColumn="Sum" DataSetColumn="Sum" />
              <Mapping SourceColumn="ExpirationDate" DataSetColumn="ExpirationDate" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="Torg12_InfoTableAdapter" GeneratorDataComponentClassName="Torg12_InfoTableAdapter" Name="Torg12_Info" UserDataComponentName="Torg12_InfoTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Number					= d.DocNumber					-- Номер накладной
	,	Date					= d.DocDate						-- Дата накладной
	,	AptekaName				= a.Name 						-- Наименование аптеки
	,	DepartName				= p.Name						-- Наименование подразделения
	,	AptekaAddress			= a.ActualAddress				-- Адрес аптеки
	,	AptekaInn				= a.INN							-- ИНН аптеки
	,	AptekaAgent				= a.Name						-- Наименование и адрес грузоотправителя
	,	ChiefPosition			= a.DirectorPosition			-- Должность директора ("Директор", "Генеральный директор" и т.п.)
	,	ChiefName				= a.DirectorFIO					-- ФИО директора
	,	BookkeeperName			= convert(varchar(100), null)	-- ФИО главного бухгалтера
	,	OKPO					= a.OKPO						-- Код по ОКПО
	,	OKDP					= convert(varchar(12), null)	-- Код по ОКДП
	,	Reason					= convert(varchar(15), null)	-- Основание
	,	ReasonNumber			= convert(varchar(15), null)	-- Номер основания
	,	ReasonDate				= convert(datetime, null)		-- Дата основания
	,	CustomerName			= c.Name						-- Наименование покупателя
	,	CustomerAddress			= a.ActualAddress				-- Адрес покупателя
from	pr.DepartmentOptions	o
join	co.Departments			p
	on	p.Id					= o.DepartmentId
join	ca.Contragents			a
	on	a.Id					= 0
join	ca.Documents			d
	on	d.Id					= @DocId
join	ca.Contragents			c
	on	c.Id					= ContragentId
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Number" DataSetColumn="Number" />
              <Mapping SourceColumn="Date" DataSetColumn="Date" />
              <Mapping SourceColumn="AptekaName" DataSetColumn="AptekaName" />
              <Mapping SourceColumn="DepartName" DataSetColumn="DepartName" />
              <Mapping SourceColumn="AptekaAddress" DataSetColumn="AptekaAddress" />
              <Mapping SourceColumn="AptekaInn" DataSetColumn="AptekaInn" />
              <Mapping SourceColumn="AptekaAgent" DataSetColumn="AptekaAgent" />
              <Mapping SourceColumn="ChiefPosition" DataSetColumn="ChiefPosition" />
              <Mapping SourceColumn="ChiefName" DataSetColumn="ChiefName" />
              <Mapping SourceColumn="BookkeeperName" DataSetColumn="BookkeeperName" />
              <Mapping SourceColumn="OKPO" DataSetColumn="OKPO" />
              <Mapping SourceColumn="OKDP" DataSetColumn="OKDP" />
              <Mapping SourceColumn="Reason" DataSetColumn="Reason" />
              <Mapping SourceColumn="ReasonNumber" DataSetColumn="ReasonNumber" />
              <Mapping SourceColumn="ReasonDate" DataSetColumn="ReasonDate" />
              <Mapping SourceColumn="CustomerName" DataSetColumn="CustomerName" />
              <Mapping SourceColumn="CustomerAddress" DataSetColumn="CustomerAddress" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="Torg12_SupplierReturnTableAdapter" GeneratorDataComponentClassName="Torg12_SupplierReturnTableAdapter" Name="Torg12_SupplierReturn" UserDataComponentName="Torg12_SupplierReturnTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     v.FullName AS GoodsName, CONVERT(varchar(15), NULL) AS GoodsCode, 'шт' AS UoM, CONVERT(varchar(15), NULL) AS UoM_OKEI, 
                      CONVERT(varchar(15), NULL) AS PackKind, - l.Qntty AS Count, CONVERT(float, NULL) AS Weigth, - (l.Qntty * i.SupplierPrice) AS Sum, 
                      i.NDSValue AS VatSum, i.NDSTax AS VatPercent
FROM         CA.Documents AS d INNER JOIN
                      CA.GoodsDocLines AS l ON l.DocId = d.Id INNER JOIN
                      CD.Parties AS p ON p.Id = l.PartyId INNER JOIN
                      CD.InputLines AS i ON i.Id = p.InputLineId INNER JOIN
                      vwGoodsDetailed AS v ON v.Id = p.GoodsId
WHERE     (d.Id = @DocId)
ORDER BY GoodsName, v.ManufacturerName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="GoodsName" DataSetColumn="GoodsName" />
              <Mapping SourceColumn="GoodsCode" DataSetColumn="GoodsCode" />
              <Mapping SourceColumn="UoM" DataSetColumn="UoM" />
              <Mapping SourceColumn="UoM_OKEI" DataSetColumn="UoM_OKEI" />
              <Mapping SourceColumn="PackKind" DataSetColumn="PackKind" />
              <Mapping SourceColumn="Count" DataSetColumn="Count" />
              <Mapping SourceColumn="Weigth" DataSetColumn="Weigth" />
              <Mapping SourceColumn="Sum" DataSetColumn="Sum" />
              <Mapping SourceColumn="VatSum" DataSetColumn="VatSum" />
              <Mapping SourceColumn="VatPercent" DataSetColumn="VatPercent" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="OpenCloseCashTableAdapter" GeneratorDataComponentClassName="OpenCloseCashTableAdapter" Name="OpenCloseCash" UserDataComponentName="OpenCloseCashTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT   SUM((CA.GoodsDocLines.RetailSum * - 1)) as SummaKass, CD.CashRegisterShifts.Id, 
CD.CashRegisters.Name as KassaName, CD.CashRegisters.KKMNumber, CD.CashRegisterShifts.OpenDT, CD.CashRegisterShifts.CloseDT
FROM         CA.Documents INNER JOIN
CA.GoodsDocLines ON CA.Documents.Id = CA.GoodsDocLines.DocId INNER JOIN
CD.Parties ON CA.GoodsDocLines.PartyId = CD.Parties.Id INNER JOIN
CD.InputLines ON CD.Parties.InputLineId = CD.InputLines.Id INNER JOIN
CD.CashRegisterShifts ON CA.Documents.CashRegisterShiftId = CD.CashRegisterShifts.Id AND 
CA.Documents.CashRegisterShiftId = CD.CashRegisterShifts.Id INNER JOIN
CD.CashRegisters ON CD.CashRegisterShifts.CashRegisterId = CD.CashRegisters.Id LEFT OUTER JOIN
CO.Departments ON CA.Documents.DepartmentId = CO.Departments.Id
WHERE     (CA.Documents.DocTypeId = 3) 
--AND CA.Documents.DocDate &gt;= '07.07.2008' AND CA.Documents.DocDate &lt; '08.07.2008'
--BETWEEN CAST('20080707' AS datetime) AND CAST('20080707' AS datetime)
GROUP BY CD.CashRegisterShifts.Id, CD.CashRegisters.Name, 
CD.CashRegisters.KKMNumber, CD.CashRegisterShifts.OpenDT, CD.CashRegisterShifts.CloseDT
ORDER BY CD.CashRegisterShifts.OpenDT</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="SummaKass" DataSetColumn="SummaKass" />
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="KassaName" DataSetColumn="KassaName" />
              <Mapping SourceColumn="KKMNumber" DataSetColumn="KKMNumber" />
              <Mapping SourceColumn="OpenDT" DataSetColumn="OpenDT" />
              <Mapping SourceColumn="CloseDT" DataSetColumn="CloseDT" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="Reports" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="Reports" msprop:Generator_DataSetName="Reports">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Reports_GetSZData" msprop:Generator_UserTableName="Reports_GetSZData" msprop:Generator_RowDeletedName="Reports_GetSZDataRowDeleted" msprop:Generator_RowChangedName="Reports_GetSZDataRowChanged" msprop:Generator_RowClassName="Reports_GetSZDataRow" msprop:Generator_RowChangingName="Reports_GetSZDataRowChanging" msprop:Generator_RowEvArgName="Reports_GetSZDataRowChangeEvent" msprop:Generator_RowEvHandlerName="Reports_GetSZDataRowChangeEventHandler" msprop:Generator_TableClassName="Reports_GetSZDataDataTable" msprop:Generator_TableVarName="tableReports_GetSZData" msprop:Generator_RowDeletingName="Reports_GetSZDataRowDeleting" msprop:Generator_TablePropName="Reports_GetSZData">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="FullName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="FullName" msprop:Generator_ColumnPropNameInRow="FullName" msprop:Generator_ColumnVarNameInTable="columnFullName" msprop:Generator_ColumnPropNameInTable="FullNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RestQntty" msprop:Generator_UserColumnName="RestQntty" msprop:Generator_ColumnPropNameInRow="RestQntty" msprop:Generator_ColumnVarNameInTable="columnRestQntty" msprop:Generator_ColumnPropNameInTable="RestQnttyColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="BarCode" msprop:Generator_UserColumnName="BarCode" msprop:Generator_ColumnPropNameInRow="BarCode" msprop:Generator_ColumnVarNameInTable="columnBarCode" msprop:Generator_ColumnPropNameInTable="BarCodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CertificateNumber" msprop:Generator_UserColumnName="CertificateNumber" msprop:Generator_ColumnPropNameInRow="CertificateNumber" msprop:Generator_ColumnVarNameInTable="columnCertificateNumber" msprop:Generator_ColumnPropNameInTable="CertificateNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="80" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="BatchNumber" msprop:Generator_UserColumnName="BatchNumber" msprop:Generator_ColumnPropNameInRow="BatchNumber" msprop:Generator_ColumnVarNameInTable="columnBatchNumber" msprop:Generator_ColumnPropNameInTable="BatchNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="CertificateDate" msprop:Generator_UserColumnName="CertificateDate" msprop:Generator_ColumnPropNameInRow="CertificateDate" msprop:Generator_ColumnVarNameInTable="columnCertificateDate" msprop:Generator_ColumnPropNameInTable="CertificateDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ContragentName" msprop:Generator_UserColumnName="ContragentName" msprop:Generator_ColumnVarNameInTable="columnContragentName" msprop:Generator_ColumnPropNameInRow="ContragentName" msprop:Generator_ColumnPropNameInTable="ContragentNameColumn" type="xs:string" />
              <xs:element name="ContragentDocDate" msprop:Generator_UserColumnName="ContragentDocDate" msprop:Generator_ColumnPropNameInRow="ContragentDocDate" msprop:Generator_ColumnVarNameInTable="columnContragentDocDate" msprop:Generator_ColumnPropNameInTable="ContragentDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ContragentDocNumber" msprop:Generator_UserColumnName="ContragentDocNumber" msprop:Generator_ColumnPropNameInRow="ContragentDocNumber" msprop:Generator_ColumnVarNameInTable="columnContragentDocNumber" msprop:Generator_ColumnPropNameInTable="ContragentDocNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Torg13_Info" msprop:Generator_UserTableName="Torg13_Info" msprop:Generator_RowDeletedName="Torg13_InfoRowDeleted" msprop:Generator_RowChangedName="Torg13_InfoRowChanged" msprop:Generator_RowClassName="Torg13_InfoRow" msprop:Generator_RowChangingName="Torg13_InfoRowChanging" msprop:Generator_RowEvArgName="Torg13_InfoRowChangeEvent" msprop:Generator_RowEvHandlerName="Torg13_InfoRowChangeEventHandler" msprop:Generator_TableClassName="Torg13_InfoDataTable" msprop:Generator_TableVarName="tableTorg13_Info" msprop:Generator_RowDeletingName="Torg13_InfoRowDeleting" msprop:Generator_TablePropName="Torg13_Info">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CreditorName" msprop:Generator_UserColumnName="CreditorName" msprop:Generator_ColumnPropNameInRow="CreditorName" msprop:Generator_ColumnVarNameInTable="columnCreditorName" msprop:Generator_ColumnPropNameInTable="CreditorNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DebitorName" msprop:Generator_UserColumnName="DebitorName" msprop:Generator_ColumnPropNameInRow="DebitorName" msprop:Generator_ColumnVarNameInTable="columnDebitorName" msprop:Generator_ColumnPropNameInTable="DebitorNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="AptekaName" msprop:Generator_UserColumnName="AptekaName" msprop:Generator_ColumnPropNameInRow="AptekaName" msprop:Generator_ColumnVarNameInTable="columnAptekaName" msprop:Generator_ColumnPropNameInTable="AptekaNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Torg13_Data" msprop:Generator_UserTableName="Torg13_Data" msprop:Generator_RowDeletedName="Torg13_DataRowDeleted" msprop:Generator_RowChangedName="Torg13_DataRowChanged" msprop:Generator_RowClassName="Torg13_DataRow" msprop:Generator_RowChangingName="Torg13_DataRowChanging" msprop:Generator_RowEvArgName="Torg13_DataRowChangeEvent" msprop:Generator_RowEvHandlerName="Torg13_DataRowChangeEventHandler" msprop:Generator_TableClassName="Torg13_DataDataTable" msprop:Generator_TableVarName="tableTorg13_Data" msprop:Generator_RowDeletingName="Torg13_DataRowDeleting" msprop:Generator_TablePropName="Torg13_Data">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Qntty" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="RetailSum" msdata:ReadOnly="true" msprop:Generator_UserColumnName="RetailSum" msprop:Generator_ColumnVarNameInTable="columnRetailSum" msprop:Generator_ColumnPropNameInRow="RetailSum" msprop:Generator_ColumnPropNameInTable="RetailSumColumn" type="xs:decimal" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Mx15_Info" msprop:Generator_UserTableName="Mx15_Info" msprop:Generator_RowDeletedName="Mx15_InfoRowDeleted" msprop:Generator_RowChangedName="Mx15_InfoRowChanged" msprop:Generator_RowClassName="Mx15_InfoRow" msprop:Generator_RowChangingName="Mx15_InfoRowChanging" msprop:Generator_RowEvArgName="Mx15_InfoRowChangeEvent" msprop:Generator_RowEvHandlerName="Mx15_InfoRowChangeEventHandler" msprop:Generator_TableClassName="Mx15_InfoDataTable" msprop:Generator_TableVarName="tableMx15_Info" msprop:Generator_RowDeletingName="Mx15_InfoRowDeleting" msprop:Generator_TablePropName="Mx15_Info">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="AptekaName" msprop:Generator_UserColumnName="AptekaName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="AptekaName" msprop:Generator_ColumnPropNameInTable="AptekaNameColumn" msprop:Generator_ColumnVarNameInTable="columnAptekaName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DepartmentName" msprop:Generator_UserColumnName="DepartmentName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="DepartmentName" msprop:Generator_ColumnPropNameInTable="DepartmentNameColumn" msprop:Generator_ColumnVarNameInTable="columnDepartmentName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnVarNameInTable="columnDocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReasonDate" msdata:ReadOnly="true" msprop:Generator_UserColumnName="ReasonDate" msprop:Generator_ColumnPropNameInRow="ReasonDate" msprop:Generator_ColumnVarNameInTable="columnReasonDate" msprop:Generator_ColumnPropNameInTable="ReasonDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ReasonNumber" msdata:ReadOnly="true" msprop:Generator_UserColumnName="ReasonNumber" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ReasonNumber" msprop:Generator_ColumnPropNameInTable="ReasonNumberColumn" msprop:Generator_ColumnVarNameInTable="columnReasonNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Position" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Position" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Position" msprop:Generator_ColumnPropNameInTable="PositionColumn" msprop:Generator_ColumnVarNameInTable="columnPosition" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Person" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Person" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Person" msprop:Generator_ColumnPropNameInTable="PersonColumn" msprop:Generator_ColumnVarNameInTable="columnPerson" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Position1" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Position1" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Position1" msprop:Generator_ColumnPropNameInTable="Position1Column" msprop:Generator_ColumnVarNameInTable="columnPosition1" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Person1" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Person1" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Person1" msprop:Generator_ColumnPropNameInTable="Person1Column" msprop:Generator_ColumnVarNameInTable="columnPerson1" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Position2" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Position2" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Position2" msprop:Generator_ColumnPropNameInTable="Position2Column" msprop:Generator_ColumnVarNameInTable="columnPosition2" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Person2" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Person2" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Person2" msprop:Generator_ColumnPropNameInTable="Person2Column" msprop:Generator_ColumnVarNameInTable="columnPerson2" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPosition0" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPosition0" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MemberPosition0" msprop:Generator_ColumnPropNameInTable="MemberPosition0Column" msprop:Generator_ColumnVarNameInTable="columnMemberPosition0" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPerson0" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPerson0" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MemberPerson0" msprop:Generator_ColumnPropNameInTable="MemberPerson0Column" msprop:Generator_ColumnVarNameInTable="columnMemberPerson0" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPosition1" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPosition1" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MemberPosition1" msprop:Generator_ColumnPropNameInTable="MemberPosition1Column" msprop:Generator_ColumnVarNameInTable="columnMemberPosition1" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPerson1" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPerson1" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MemberPerson1" msprop:Generator_ColumnPropNameInTable="MemberPerson1Column" msprop:Generator_ColumnVarNameInTable="columnMemberPerson1" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPosition2" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPosition2" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MemberPosition2" msprop:Generator_ColumnPropNameInTable="MemberPosition2Column" msprop:Generator_ColumnVarNameInTable="columnMemberPosition2" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPerson2" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPerson2" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MemberPerson2" msprop:Generator_ColumnPropNameInTable="MemberPerson2Column" msprop:Generator_ColumnVarNameInTable="columnMemberPerson2" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Mx15_Data" msprop:Generator_UserTableName="Mx15_Data" msprop:Generator_RowDeletedName="Mx15_DataRowDeleted" msprop:Generator_RowChangedName="Mx15_DataRowChanged" msprop:Generator_RowClassName="Mx15_DataRow" msprop:Generator_RowChangingName="Mx15_DataRowChanging" msprop:Generator_RowEvArgName="Mx15_DataRowChangeEvent" msprop:Generator_RowEvHandlerName="Mx15_DataRowChangeEventHandler" msprop:Generator_TableClassName="Mx15_DataDataTable" msprop:Generator_TableVarName="tableMx15_Data" msprop:Generator_RowDeletingName="Mx15_DataRowDeleting" msprop:Generator_TablePropName="Mx15_Data">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="IncomeDate" msprop:Generator_UserColumnName="IncomeDate" msprop:Generator_ColumnVarNameInTable="columnIncomeDate" msprop:Generator_ColumnPropNameInRow="IncomeDate" msprop:Generator_ColumnPropNameInTable="IncomeDateColumn" type="xs:dateTime" />
              <xs:element name="MadeDate" msprop:Generator_UserColumnName="MadeDate" msprop:Generator_ColumnVarNameInTable="columnMadeDate" msprop:Generator_ColumnPropNameInRow="MadeDate" msprop:Generator_ColumnPropNameInTable="MadeDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="InvoiceDate" msprop:Generator_UserColumnName="InvoiceDate" msprop:Generator_ColumnVarNameInTable="columnInvoiceDate" msprop:Generator_ColumnPropNameInRow="InvoiceDate" msprop:Generator_ColumnPropNameInTable="InvoiceDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="InvoiceNumber" msprop:Generator_UserColumnName="InvoiceNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnInvoiceNumber" msprop:Generator_ColumnPropNameInTable="InvoiceNumberColumn" msprop:Generator_ColumnPropNameInRow="InvoiceNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnPropNameInRow="Name">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" />
              <xs:element name="ReducePercent" msdata:ReadOnly="true" msprop:Generator_UserColumnName="ReducePercent" msprop:Generator_ColumnVarNameInTable="columnReducePercent" msprop:Generator_ColumnPropNameInRow="ReducePercent" msprop:Generator_ColumnPropNameInTable="ReducePercentColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="OldRetailPrice" msprop:Generator_UserColumnName="OldRetailPrice" msprop:Generator_ColumnVarNameInTable="columnOldRetailPrice" msprop:Generator_ColumnPropNameInRow="OldRetailPrice" msprop:Generator_ColumnPropNameInTable="OldRetailPriceColumn" type="xs:decimal" />
              <xs:element name="OldRetailSum" msdata:ReadOnly="true" msprop:Generator_UserColumnName="OldRetailSum" msprop:Generator_ColumnVarNameInTable="columnOldRetailSum" msprop:Generator_ColumnPropNameInRow="OldRetailSum" msprop:Generator_ColumnPropNameInTable="OldRetailSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="NewRetailPrice" msprop:Generator_UserColumnName="NewRetailPrice" msprop:Generator_ColumnVarNameInTable="columnNewRetailPrice" msprop:Generator_ColumnPropNameInRow="NewRetailPrice" msprop:Generator_ColumnPropNameInTable="NewRetailPriceColumn" type="xs:decimal" />
              <xs:element name="NewRetailSum" msprop:Generator_UserColumnName="NewRetailSum" msprop:Generator_ColumnVarNameInTable="columnNewRetailSum" msprop:Generator_ColumnPropNameInRow="NewRetailSum" msprop:Generator_ColumnPropNameInTable="NewRetailSumColumn" type="xs:decimal" />
              <xs:element name="PriceDefference" msdata:ReadOnly="true" msprop:Generator_UserColumnName="PriceDefference" msprop:Generator_ColumnVarNameInTable="columnPriceDefference" msprop:Generator_ColumnPropNameInRow="PriceDefference" msprop:Generator_ColumnPropNameInTable="PriceDefferenceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="SumDefference" msdata:ReadOnly="true" msprop:Generator_UserColumnName="SumDefference" msprop:Generator_ColumnVarNameInTable="columnSumDefference" msprop:Generator_ColumnPropNameInRow="SumDefference" msprop:Generator_ColumnPropNameInTable="SumDefferenceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReduceReason" msdata:ReadOnly="true" msprop:Generator_UserColumnName="ReduceReason" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnReduceReason" msprop:Generator_ColumnPropNameInTable="ReduceReasonColumn" msprop:Generator_ColumnPropNameInRow="ReduceReason" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReduceSign" msdata:ReadOnly="true" msprop:Generator_UserColumnName="ReduceSign" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnReduceSign" msprop:Generator_ColumnPropNameInTable="ReduceSignColumn" msprop:Generator_ColumnPropNameInRow="ReduceSign" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OldBarcode" msprop:Generator_UserColumnName="OldBarcode" msprop:Generator_ColumnPropNameInRow="OldBarcode" msprop:Generator_ColumnVarNameInTable="columnOldBarcode" msprop:Generator_ColumnPropNameInTable="OldBarcodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="NewBarcode" msprop:Generator_UserColumnName="NewBarcode" msprop:Generator_ColumnPropNameInRow="NewBarcode" msprop:Generator_ColumnVarNameInTable="columnNewBarcode" msprop:Generator_ColumnPropNameInTable="NewBarcodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="WriteOff_Info" msprop:Generator_UserTableName="WriteOff_Info" msprop:Generator_RowDeletedName="WriteOff_InfoRowDeleted" msprop:Generator_RowChangedName="WriteOff_InfoRowChanged" msprop:Generator_RowClassName="WriteOff_InfoRow" msprop:Generator_RowChangingName="WriteOff_InfoRowChanging" msprop:Generator_RowEvArgName="WriteOff_InfoRowChangeEvent" msprop:Generator_RowEvHandlerName="WriteOff_InfoRowChangeEventHandler" msprop:Generator_TableClassName="WriteOff_InfoDataTable" msprop:Generator_TableVarName="tableWriteOff_Info" msprop:Generator_RowDeletingName="WriteOff_InfoRowDeleting" msprop:Generator_TablePropName="WriteOff_Info">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="AptekaName" msprop:Generator_UserColumnName="AptekaName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnAptekaName" msprop:Generator_ColumnPropNameInTable="AptekaNameColumn" msprop:Generator_ColumnPropNameInRow="AptekaName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DepartmentName" msprop:Generator_UserColumnName="DepartmentName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDepartmentName" msprop:Generator_ColumnPropNameInTable="DepartmentNameColumn" msprop:Generator_ColumnPropNameInRow="DepartmentName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnPropNameInRow="DocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Position1" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Position1" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnPosition1" msprop:Generator_ColumnPropNameInTable="Position1Column" msprop:Generator_ColumnPropNameInRow="Position1" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Person1" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Person1" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnPerson1" msprop:Generator_ColumnPropNameInTable="Person1Column" msprop:Generator_ColumnPropNameInRow="Person1" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPosition0" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPosition0" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMemberPosition0" msprop:Generator_ColumnPropNameInTable="MemberPosition0Column" msprop:Generator_ColumnPropNameInRow="MemberPosition0" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPerson0" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPerson0" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMemberPerson0" msprop:Generator_ColumnPropNameInTable="MemberPerson0Column" msprop:Generator_ColumnPropNameInRow="MemberPerson0" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPosition1" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPosition1" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMemberPosition1" msprop:Generator_ColumnPropNameInTable="MemberPosition1Column" msprop:Generator_ColumnPropNameInRow="MemberPosition1" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPerson1" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPerson1" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMemberPerson1" msprop:Generator_ColumnPropNameInTable="MemberPerson1Column" msprop:Generator_ColumnPropNameInRow="MemberPerson1" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPosition2" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPosition2" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMemberPosition2" msprop:Generator_ColumnPropNameInTable="MemberPosition2Column" msprop:Generator_ColumnPropNameInRow="MemberPosition2" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MemberPerson2" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MemberPerson2" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMemberPerson2" msprop:Generator_ColumnPropNameInTable="MemberPerson2Column" msprop:Generator_ColumnPropNameInRow="MemberPerson2" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="WriteOff_Data" msprop:Generator_UserTableName="WriteOff_Data" msprop:Generator_RowDeletedName="WriteOff_DataRowDeleted" msprop:Generator_RowChangedName="WriteOff_DataRowChanged" msprop:Generator_RowClassName="WriteOff_DataRow" msprop:Generator_RowChangingName="WriteOff_DataRowChanging" msprop:Generator_RowEvArgName="WriteOff_DataRowChangeEvent" msprop:Generator_RowEvHandlerName="WriteOff_DataRowChangeEventHandler" msprop:Generator_TableClassName="WriteOff_DataDataTable" msprop:Generator_TableVarName="tableWriteOff_Data" msprop:Generator_RowDeletingName="WriteOff_DataRowDeleting" msprop:Generator_TablePropName="WriteOff_Data">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnPropNameInRow="Name" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Qntty" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="RetailSum" msdata:ReadOnly="true" msprop:Generator_UserColumnName="RetailSum" msprop:Generator_ColumnVarNameInTable="columnRetailSum" msprop:Generator_ColumnPropNameInRow="RetailSum" msprop:Generator_ColumnPropNameInTable="RetailSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReduceReason" msdata:ReadOnly="true" msprop:Generator_UserColumnName="ReduceReason" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ReduceReason" msprop:Generator_ColumnPropNameInTable="ReduceReasonColumn" msprop:Generator_ColumnVarNameInTable="columnReduceReason" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReduceSign" msprop:Generator_UserColumnName="ReduceSign" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ReduceSign" msprop:Generator_ColumnPropNameInTable="ReduceSignColumn" msprop:Generator_ColumnVarNameInTable="columnReduceSign" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Barcode" msprop:Generator_UserColumnName="Barcode" msprop:Generator_ColumnPropNameInRow="Barcode" msprop:Generator_ColumnVarNameInTable="columnBarcode" msprop:Generator_ColumnPropNameInTable="BarcodeColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="SupplierPrice" msprop:Generator_UserColumnName="SupplierPrice" msprop:Generator_ColumnPropNameInRow="SupplierPrice" msprop:Generator_ColumnVarNameInTable="columnSupplierPrice" msprop:Generator_ColumnPropNameInTable="SupplierPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="SupplierSum" msdata:ReadOnly="true" msprop:Generator_UserColumnName="SupplierSum" msprop:Generator_ColumnPropNameInRow="SupplierSum" msprop:Generator_ColumnVarNameInTable="columnSupplierSum" msprop:Generator_ColumnPropNameInTable="SupplierSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="SumDifference" msdata:ReadOnly="true" msprop:Generator_UserColumnName="SumDifference" msprop:Generator_ColumnPropNameInRow="SumDifference" msprop:Generator_ColumnVarNameInTable="columnSumDifference" msprop:Generator_ColumnPropNameInTable="SumDifferenceColumn" type="xs:decimal" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShortageReport_Info" msprop:Generator_UserTableName="ShortageReport_Info" msprop:Generator_RowDeletedName="ShortageReport_InfoRowDeleted" msprop:Generator_RowChangedName="ShortageReport_InfoRowChanged" msprop:Generator_RowClassName="ShortageReport_InfoRow" msprop:Generator_RowChangingName="ShortageReport_InfoRowChanging" msprop:Generator_RowEvArgName="ShortageReport_InfoRowChangeEvent" msprop:Generator_RowEvHandlerName="ShortageReport_InfoRowChangeEventHandler" msprop:Generator_TableClassName="ShortageReport_InfoDataTable" msprop:Generator_TableVarName="tableShortageReport_Info" msprop:Generator_RowDeletingName="ShortageReport_InfoRowDeleting" msprop:Generator_TablePropName="ShortageReport_Info">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Number" msprop:Generator_UserColumnName="Number" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNumber" msprop:Generator_ColumnPropNameInTable="NumberColumn" msprop:Generator_ColumnPropNameInRow="Number" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Date" msprop:Generator_UserColumnName="Date" msprop:Generator_ColumnVarNameInTable="columnDate" msprop:Generator_ColumnPropNameInRow="Date" msprop:Generator_ColumnPropNameInTable="DateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="AptekaName" msprop:Generator_UserColumnName="AptekaName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnAptekaName" msprop:Generator_ColumnPropNameInTable="AptekaNameColumn" msprop:Generator_ColumnPropNameInRow="AptekaName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ChiefName" msprop:Generator_UserColumnName="ChiefName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnChiefName" msprop:Generator_ColumnPropNameInTable="ChiefNameColumn" msprop:Generator_ColumnPropNameInRow="ChiefName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="SupplierName" msprop:Generator_UserColumnName="SupplierName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnSupplierName" msprop:Generator_ColumnPropNameInTable="SupplierNameColumn" msprop:Generator_ColumnPropNameInRow="SupplierName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="IncomeDocNumber" msprop:Generator_UserColumnName="IncomeDocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnIncomeDocNumber" msprop:Generator_ColumnPropNameInTable="IncomeDocNumberColumn" msprop:Generator_ColumnPropNameInRow="IncomeDocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="IncomeDocDate" msprop:Generator_UserColumnName="IncomeDocDate" msprop:Generator_ColumnVarNameInTable="columnIncomeDocDate" msprop:Generator_ColumnPropNameInRow="IncomeDocDate" msprop:Generator_ColumnPropNameInTable="IncomeDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="RefuseReason" msprop:Generator_UserColumnName="RefuseReason" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnRefuseReason" msprop:Generator_ColumnPropNameInTable="RefuseReasonColumn" msprop:Generator_ColumnPropNameInRow="RefuseReason" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShortageReport_Data" msprop:Generator_UserTableName="ShortageReport_Data" msprop:Generator_RowDeletedName="ShortageReport_DataRowDeleted" msprop:Generator_RowChangedName="ShortageReport_DataRowChanged" msprop:Generator_RowClassName="ShortageReport_DataRow" msprop:Generator_RowChangingName="ShortageReport_DataRowChanging" msprop:Generator_RowEvArgName="ShortageReport_DataRowChangeEvent" msprop:Generator_RowEvHandlerName="ShortageReport_DataRowChangeEventHandler" msprop:Generator_TableClassName="ShortageReport_DataDataTable" msprop:Generator_TableVarName="tableShortageReport_Data" msprop:Generator_RowDeletingName="ShortageReport_DataRowDeleting" msprop:Generator_TablePropName="ShortageReport_Data">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="GoodsCode" msprop:Generator_UserColumnName="GoodsCode" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="GoodsCode" msprop:Generator_ColumnPropNameInTable="GoodsCodeColumn" msprop:Generator_ColumnVarNameInTable="columnGoodsCode" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="GoodsName" msprop:Generator_UserColumnName="GoodsName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="GoodsName" msprop:Generator_ColumnPropNameInTable="GoodsNameColumn" msprop:Generator_ColumnVarNameInTable="columnGoodsName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Manufacturer" msprop:Generator_UserColumnName="Manufacturer" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Manufacturer" msprop:Generator_ColumnPropNameInTable="ManufacturerColumn" msprop:Generator_ColumnVarNameInTable="columnManufacturer" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Lot" msprop:Generator_UserColumnName="Lot" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Lot" msprop:Generator_ColumnPropNameInTable="LotColumn" msprop:Generator_ColumnVarNameInTable="columnLot" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Count" msprop:Generator_UserColumnName="Count" msprop:Generator_ColumnVarNameInTable="columnCount" msprop:Generator_ColumnPropNameInRow="Count" msprop:Generator_ColumnPropNameInTable="CountColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Price" msprop:Generator_UserColumnName="Price" msprop:Generator_ColumnVarNameInTable="columnPrice" msprop:Generator_ColumnPropNameInRow="Price" msprop:Generator_ColumnPropNameInTable="PriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Sum" msprop:Generator_UserColumnName="Sum" msprop:Generator_ColumnVarNameInTable="columnSum" msprop:Generator_ColumnPropNameInRow="Sum" msprop:Generator_ColumnPropNameInTable="SumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ExpirationDate" msprop:Generator_UserColumnName="ExpirationDate" msprop:Generator_ColumnVarNameInTable="columnExpirationDate" msprop:Generator_ColumnPropNameInRow="ExpirationDate" msprop:Generator_ColumnPropNameInTable="ExpirationDateColumn" type="xs:dateTime" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Torg12_Info" msprop:Generator_UserTableName="Torg12_Info" msprop:Generator_RowDeletedName="Torg12_InfoRowDeleted" msprop:Generator_RowChangedName="Torg12_InfoRowChanged" msprop:Generator_RowClassName="Torg12_InfoRow" msprop:Generator_RowChangingName="Torg12_InfoRowChanging" msprop:Generator_RowEvArgName="Torg12_InfoRowChangeEvent" msprop:Generator_RowEvHandlerName="Torg12_InfoRowChangeEventHandler" msprop:Generator_TableClassName="Torg12_InfoDataTable" msprop:Generator_TableVarName="tableTorg12_Info" msprop:Generator_RowDeletingName="Torg12_InfoRowDeleting" msprop:Generator_TablePropName="Torg12_Info">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Number" msprop:Generator_UserColumnName="Number" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Number" msprop:Generator_ColumnPropNameInTable="NumberColumn" msprop:Generator_ColumnVarNameInTable="columnNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Date" msprop:Generator_UserColumnName="Date" msprop:Generator_ColumnPropNameInRow="Date" msprop:Generator_ColumnVarNameInTable="columnDate" msprop:Generator_ColumnPropNameInTable="DateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="AptekaName" msprop:Generator_UserColumnName="AptekaName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="AptekaName" msprop:Generator_ColumnPropNameInTable="AptekaNameColumn" msprop:Generator_ColumnVarNameInTable="columnAptekaName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DepartName" msprop:Generator_UserColumnName="DepartName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="DepartName" msprop:Generator_ColumnPropNameInTable="DepartNameColumn" msprop:Generator_ColumnVarNameInTable="columnDepartName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="AptekaAddress" msprop:Generator_UserColumnName="AptekaAddress" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="AptekaAddress" msprop:Generator_ColumnPropNameInTable="AptekaAddressColumn" msprop:Generator_ColumnVarNameInTable="columnAptekaAddress" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="AptekaInn" msprop:Generator_UserColumnName="AptekaInn" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="AptekaInn" msprop:Generator_ColumnPropNameInTable="AptekaInnColumn" msprop:Generator_ColumnVarNameInTable="columnAptekaInn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="AptekaAgent" msprop:Generator_UserColumnName="AptekaAgent" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="AptekaAgent" msprop:Generator_ColumnPropNameInTable="AptekaAgentColumn" msprop:Generator_ColumnVarNameInTable="columnAptekaAgent" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ChiefPosition" msprop:Generator_UserColumnName="ChiefPosition" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ChiefPosition" msprop:Generator_ColumnPropNameInTable="ChiefPositionColumn" msprop:Generator_ColumnVarNameInTable="columnChiefPosition" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ChiefName" msprop:Generator_UserColumnName="ChiefName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ChiefName" msprop:Generator_ColumnPropNameInTable="ChiefNameColumn" msprop:Generator_ColumnVarNameInTable="columnChiefName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="BookkeeperName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="BookkeeperName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="BookkeeperName" msprop:Generator_ColumnPropNameInTable="BookkeeperNameColumn" msprop:Generator_ColumnVarNameInTable="columnBookkeeperName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OKPO" msprop:Generator_UserColumnName="OKPO" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="OKPO" msprop:Generator_ColumnPropNameInTable="OKPOColumn" msprop:Generator_ColumnVarNameInTable="columnOKPO" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OKDP" msprop:Generator_UserColumnName="OKDP" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="OKDP" msprop:Generator_ColumnPropNameInTable="OKDPColumn" msprop:Generator_ColumnVarNameInTable="columnOKDP" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Reason" msprop:Generator_UserColumnName="Reason" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Reason" msprop:Generator_ColumnPropNameInTable="ReasonColumn" msprop:Generator_ColumnVarNameInTable="columnReason" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReasonNumber" msprop:Generator_UserColumnName="ReasonNumber" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ReasonNumber" msprop:Generator_ColumnPropNameInTable="ReasonNumberColumn" msprop:Generator_ColumnVarNameInTable="columnReasonNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReasonDate" msprop:Generator_UserColumnName="ReasonDate" msprop:Generator_ColumnPropNameInRow="ReasonDate" msprop:Generator_ColumnVarNameInTable="columnReasonDate" msprop:Generator_ColumnPropNameInTable="ReasonDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="CustomerName" msprop:Generator_UserColumnName="CustomerName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="CustomerName" msprop:Generator_ColumnPropNameInTable="CustomerNameColumn" msprop:Generator_ColumnVarNameInTable="columnCustomerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CustomerAddress" msprop:Generator_UserColumnName="CustomerAddress" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="CustomerAddress" msprop:Generator_ColumnPropNameInTable="CustomerAddressColumn" msprop:Generator_ColumnVarNameInTable="columnCustomerAddress" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Torg12_SupplierReturn" msprop:Generator_UserTableName="Torg12_SupplierReturn" msprop:Generator_RowDeletedName="Torg12_SupplierReturnRowDeleted" msprop:Generator_RowChangedName="Torg12_SupplierReturnRowChanged" msprop:Generator_RowClassName="Torg12_SupplierReturnRow" msprop:Generator_RowChangingName="Torg12_SupplierReturnRowChanging" msprop:Generator_RowEvArgName="Torg12_SupplierReturnRowChangeEvent" msprop:Generator_RowEvHandlerName="Torg12_SupplierReturnRowChangeEventHandler" msprop:Generator_TableClassName="Torg12_SupplierReturnDataTable" msprop:Generator_TableVarName="tableTorg12_SupplierReturn" msprop:Generator_RowDeletingName="Torg12_SupplierReturnRowDeleting" msprop:Generator_TablePropName="Torg12_SupplierReturn">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="GoodsName" msprop:Generator_UserColumnName="GoodsName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnGoodsName" msprop:Generator_ColumnPropNameInTable="GoodsNameColumn" msprop:Generator_ColumnPropNameInRow="GoodsName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="GoodsCode" msprop:Generator_UserColumnName="GoodsCode" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnGoodsCode" msprop:Generator_ColumnPropNameInTable="GoodsCodeColumn" msprop:Generator_ColumnPropNameInRow="GoodsCode" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="UoM" msprop:Generator_UserColumnName="UoM" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnUoM" msprop:Generator_ColumnPropNameInTable="UoMColumn" msprop:Generator_ColumnPropNameInRow="UoM" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="UoM_OKEI" msprop:Generator_UserColumnName="UoM_OKEI" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnUoM_OKEI" msprop:Generator_ColumnPropNameInTable="UoM_OKEIColumn" msprop:Generator_ColumnPropNameInRow="UoM_OKEI" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="PackKind" msprop:Generator_UserColumnName="PackKind" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnPackKind" msprop:Generator_ColumnPropNameInTable="PackKindColumn" msprop:Generator_ColumnPropNameInRow="PackKind" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Count" msprop:Generator_UserColumnName="Count" msprop:Generator_ColumnPropNameInRow="Count" msprop:Generator_ColumnVarNameInTable="columnCount" msprop:Generator_ColumnPropNameInTable="CountColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Weigth" msprop:Generator_UserColumnName="Weigth" msprop:Generator_ColumnPropNameInRow="Weigth" msprop:Generator_ColumnVarNameInTable="columnWeigth" msprop:Generator_ColumnPropNameInTable="WeigthColumn" type="xs:double" minOccurs="0" />
              <xs:element name="Sum" msprop:Generator_UserColumnName="Sum" msprop:Generator_ColumnPropNameInRow="Sum" msprop:Generator_ColumnVarNameInTable="columnSum" msprop:Generator_ColumnPropNameInTable="SumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="VatSum" msprop:Generator_UserColumnName="VatSum" msprop:Generator_ColumnPropNameInRow="VatSum" msprop:Generator_ColumnVarNameInTable="columnVatSum" msprop:Generator_ColumnPropNameInTable="VatSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="VatPercent" msprop:Generator_UserColumnName="VatPercent" msprop:Generator_ColumnPropNameInRow="VatPercent" msprop:Generator_ColumnVarNameInTable="columnVatPercent" msprop:Generator_ColumnPropNameInTable="VatPercentColumn" type="xs:unsignedByte" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="OpenCloseCash" msprop:Generator_UserTableName="OpenCloseCash" msprop:Generator_RowDeletedName="OpenCloseCashRowDeleted" msprop:Generator_TableClassName="OpenCloseCashDataTable" msprop:Generator_RowChangedName="OpenCloseCashRowChanged" msprop:Generator_RowClassName="OpenCloseCashRow" msprop:Generator_RowChangingName="OpenCloseCashRowChanging" msprop:Generator_RowEvArgName="OpenCloseCashRowChangeEvent" msprop:Generator_RowEvHandlerName="OpenCloseCashRowChangeEventHandler" msprop:Generator_TablePropName="OpenCloseCash" msprop:Generator_TableVarName="tableOpenCloseCash" msprop:Generator_RowDeletingName="OpenCloseCashRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="SummaKass" msdata:ReadOnly="true" msprop:Generator_UserColumnName="SummaKass" msprop:Generator_ColumnPropNameInRow="SummaKass" msprop:Generator_ColumnVarNameInTable="columnSummaKass" msprop:Generator_ColumnPropNameInTable="SummaKassColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Id" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="KassaName" msprop:Generator_UserColumnName="KassaName" msprop:Generator_ColumnPropNameInRow="KassaName" msprop:Generator_ColumnVarNameInTable="columnKassaName" msprop:Generator_ColumnPropNameInTable="KassaNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="KKMNumber" msprop:Generator_UserColumnName="KKMNumber" msprop:Generator_ColumnPropNameInRow="KKMNumber" msprop:Generator_ColumnVarNameInTable="columnKKMNumber" msprop:Generator_ColumnPropNameInTable="KKMNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OpenDT" msprop:Generator_UserColumnName="OpenDT" msprop:Generator_ColumnPropNameInRow="OpenDT" msprop:Generator_ColumnVarNameInTable="columnOpenDT" msprop:Generator_ColumnPropNameInTable="OpenDTColumn" type="xs:dateTime" />
              <xs:element name="CloseDT" msprop:Generator_UserColumnName="CloseDT" msprop:Generator_ColumnPropNameInRow="CloseDT" msprop:Generator_ColumnVarNameInTable="columnCloseDT" msprop:Generator_ColumnPropNameInTable="CloseDTColumn" type="xs:dateTime" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Reports_GetSZData" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="OpenCloseCash_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:OpenCloseCash" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
  </xs:element>
</xs:schema>